package com.sdutcm.health_bigdata_demo.controller;

import com.sdutcm.health_bigdata_demo.bean.User;
import com.sdutcm.health_bigdata_demo.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 *
 * @author 小浩
 * @date 2018-09-23 16:31
 * @package com.sdutcm.health_bigdata_demo.controller
 * @description
 */
@RestController
@RequestMapping("/user")
public class UserController {
    @Autowired
    UserService userService;

    //登录
    @RequestMapping("/login")
    public boolean login(User user){
        return userService.login(user);
    }

    //注册
    @RequestMapping("/register")
    public boolean register(User user){
        return userService.register(user);
    }
}
